const app = getApp();
// const URL = 'https://www.oybtrip.com';
const URL = app.globalData.URL;

Page({
  data: {
    text: ``,
  },
  onLoad() {},
  wdht(){
    console.log('open document success')
    my.downloadFile({
          url: URL+'/admin-api/infra/file/4/get/537a7744ebadaab0dc8ff1103b5f43dfb5780c2b063a9f700ef09736bae45add.pdf',
          success({ apFilePath }) {
            my.hideLoading();
            my.openDocument({
              filePath: apFilePath,
              fileType: 'pdf',
              success: (res) => {
                console.log('open document success-----')
                }
              })
            }
          })
    
  },
  htmx(){
    my.navigateTo({
      url: './xy/xy' // 新页面的路径，可以传递参数
    })
  },
  scqm(){
    my.alert({content:"上传签名"});

  },
  onShareAppMessage(options) {
    my.alert({ content: JSON.stringify(options.webViewUrl) });
    return {
      title: '分享 web-View 组件',
      desc: 'View 组件很通用',
      path: 'page/component/component-pages/webview/baidu',
      'web-view': options.webViewUrl,
    };
  },
  onmessage(e) {
    my.alert({
      content: '拿到数据' + JSON.stringify(e), // alert 框的标题
    });
  },
});
